package ubc.cs.cpsc210.sustainabilityapp.model;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 *  Represent a building of interest.
 */
public class Building extends PointOfInterest {

	// Sustainability features associated with the building
	private List<Feature> features = new ArrayList<Feature>();
	
	/**
	 * Constructor
	 * 
	 * <br><br>
	 * <b>Requires:</b> <br> id must be unique across all POIs and id and
	 * displayName are non-empty strings.<br><br>
	 * <b>Modifies:</b><br>(Similar to all constructors, modifies this)<br><br>
	 * <b>Effects:</b> <br> id and displayName are remembered in object.
	 * 
	 * @param id The identifier for the building.
	 * @param displayName The name to use when displaying the building.
	 */
	public Building(String id, String displayName) {
		super(id, displayName);
	}

	/**
	 * Get the sustainability features of this POI.
	 * 
	 * <br><br>
	 * <b>Effects:</b><br>Returns a list of features associated with the building. The list may be empty. 
	 * 
	 * @returns A list of features associated with the building
	 */
	public List<Feature> getFeatures() {
		return Collections.unmodifiableList(features);
	}


	/**
	 * Set the sustainability features associated with this POI.
	 * 
	 * <br><br>
	 * <b>Requires:</b><br>A (possibly empty, but not null) list of features to associate with the building.<br><br>
	 * <b>Modifies:</b><br>this<br><br>
	 * <b>Effects:</b><br>The building is associated with the provided features.<br><br>
	 * 
	 * @param features The features to associate with the building
	 */
	public void setFeatures(List<Feature> features) {
		this.features = features;
	}

}
